import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import junit.framework.TestCase;


public class adam2Test extends TestCase {

private Liczba li;
	
	public void setUp() throws Exception {
		li = new Liczba(16);
	}

	public void tearDown() throws Exception {
		li = null;
	}
	
	public void testSetWrongValue() throws Exception {
		try {
			li.getNumberWithBase(-10);
			fail("boom!");
		} catch (LiczbaException ex) {
			
		}
	}
	
	public void testInit() throws Exception {
		assertNotNull(li);
	}
	
	public void testGetCorrectRadix() throws Exception {
		assertEquals(li.getNumberWithBase(10), "16");
		assertEquals(li.getNumberWithBase(10), "16");
		assertEquals(li.getNumberWithBase(16), "10");
		assertEquals(li.getNumberWithBase(2), "10000");
	}
	
}
